Skip to content

feat: add last_active_at ping endpoint#955

Merged
dylanjeffers merged 2 commits into
mainfrom
feat/last-active-at-ping
Jun 16, 2026
Merged

feat: add last_active_at ping endpoint#955
dylanjeffers merged 2 commits into
mainfrom
feat/last-active-at-ping

Conversation

@dylanjeffers

@dylanjeffers dylanjeffers commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds integration tests for the POST /v1/users/me/ping endpoint (already merged in feat: add last_active_at column and POST /v1/users/me/ping endpoint #954)
  • Tests cover: authenticated 200, missing user_id 400, unauthenticated 403
  • Fixes test DB setup: seeds blocks table before users (foreign key constraint) and ensures last_active_at column exists
  • Updates 01_schema.sql to include last_active_at on the users table

Test plan

  • go build ./... passes
  • go vet ./api/... passes
  • TestPostV1UsersPing passes locally (all 3 subtests)
  • Full go test ./api/... passes (except pre-existing TestSearch which requires Elasticsearch)

🤖 Generated with Claude Code

dylanjeffers and others added 2 commits June 16, 2026 13:26
Covers authenticated 200, missing user_id 400, and unauthenticated 403
cases. Seeds the blocks table before users to satisfy the foreign key
constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The users table was missing the last_active_at column in the base schema
(01_schema.sql), and the test needed to seed the blocks table to satisfy
the users.blocknumber foreign key constraint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dylanjeffers dylanjeffers force-pushed the feat/last-active-at-ping branch from 82b12b0 to c7a34fa Compare June 16, 2026 20:32
@dylanjeffers dylanjeffers merged commit 401e37b into main Jun 16, 2026
5 checks passed
@dylanjeffers dylanjeffers deleted the feat/last-active-at-ping branch June 16, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant